package com.vincent.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@TableName("menu")
public class Menu implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private String icon;

    private String path;

    @TableField(value = "parent_id")
    private Integer parentId;

    private Integer enabled;

    private String perms;

    @TableField("order_num")
    private Integer orderNum;

    //子级菜单项
    @TableField(exist = false)
    private List<Menu> subMenus;
}
